package com.aigc.sclassroom.service.impl;

import com.aigc.sclassroom.mapper.PlanMapper;
import com.aigc.sclassroom.pojo.Plan;
import com.aigc.sclassroom.service.PlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlanServiceImpl implements PlanService {
    @Autowired
    private PlanMapper planMapper;
    @Override
    public void add(String planName) {
        planMapper.add(planName);
    }

    @Override
    public void addContent(String content,Long planId) {
        planMapper.addContents(content,planId);
    }

    @Override
    public List<Plan> selectPlanByClassId(Long classId) {
        return planMapper.selectPlanByClassId(classId);
    }

    @Override
    public String[] selectPlanContentByPlanId(Long planId) {
        return planMapper.selectPlanContentByPlanId(planId);
    }

    @Override
    public void updatePlan(Long classId, Long planId) {
        planMapper.updatePlan(classId,planId);
    }
}
